<template>
    <div id="app">
        <!-- <nav>
            <router-link to="/">Home</router-link> |
            <router-link to="/about">About</router-link>
        </nav>
        <van-button type="primary">主要按钮</van-button> -->
        <keep-alive>
            <router-view :user="user" :account="account" @setUser="setUser" @ssetLogin="ssetLogin"></router-view>
        </keep-alive>
    </div>
</template>
<script>
export default {
    data() {
        return {
            user: "",
            account: "",
        };
    },
    methods: {
        setUser({ user, account }) {
            this.user = user;
            this.account = account;
        },
        ssetLogin({ user, account }) {
            this.user = user;
            this.account = account;
            console.log(this.user);
            console.log(this.account);
        },
    },
};
</script>

<style lang="scss">
// color: #1ba784;
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

// nav {
//     padding: 30px;

//     a {
//         font-weight: bold;
//         color: #2c3e50;

//         &.router-link-exact-active {
//             color: #42b983;
//         }
//     }
// }
</style>
